<?php
include_once '../../connection/connection_database.php';
function check_user($name){
    $sql = "SELECT user_name FROM users WHERE user_name = '" . $name . "' ";
    $query = mysql_query($sql) or die(mysql_error());
    $data = mysql_num_rows($query);
    return $data;
}
echo check_user($_POST["username"]);
?>
